package gold.digger;

import gold.utils.InputUtil;

/**
 * Created by fanzhenyu02 on 2021/12/10.
 * common problem solver template.
 */
public class LC905 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public int[] sortArrayByParity(int[] nums) {
            int n = nums.length;
            for (int i = 0, j = n - 1; i < j; i++) {
                if (nums[i] % 2 == 1) {
                    int c = nums[j];
                    nums[j--] = nums[i];
                    nums[i--] = c;
                }
            }
            return nums;
        }
    }


    public void run() {
        int[] arr = InputUtil.toIntegerArray("[1,2,3]");
        System.out.println(new Solution().toString());
    }

    public static void main(String[] args) throws Exception {
        LC905 an = new LC905();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
